package com.borrowed.book.system.service;

import com.borrowed.book.system.domain.*;
import com.borrowed.book.system.exception.ReDictKeyException;
import com.borrowed.book.system.exception.RecodeDictException;

import java.util.List;
import java.util.Map;

public interface ISysDictService {
    //值转换
    public String transformStr(String distname, int key) ;

    //刷新缓存
    public Map getDictMap();

    //根据类型获取数据字典值
    public List<SysDictPojo> getDictByType(String code);

    //根据类型和key获取字典value值
    public SysDictPojo getDictByTypeAndKey(String type,String key);

    //查询所有数据字典
    public List<SysDictTypePojo> getAllDictList();

    //查询所有字典类型
    public List<SysDictType> selectDictTypeList(SelectDictTypeInDto param);

    //新增数据字典类型
    void addDictType(SysDictType param) throws RecodeDictException;

    //根据字典类型查询字典属性
    public List<SysDict> selectDictByType(String code);

    //添加字典属性
    void addDict(SysDict param)  throws ReDictKeyException;

    //删除字典属性
    void deleteDictById(Long id);
    //修改字典属性
    void updateDict(SysDict param) throws ReDictKeyException;
    //删除字典类型
    void deleteDictTypeByCode(String code);

}
